/* 公哥取随机数 */
function getRandom(_min: number = 0, _max: number = 1): number {
    if (_min > _max) {
        console.error("The minimum number cannot be greater than the maximum number!")
        return 0;
    } else {
        return Math.floor(Math.random() * (_max - _min) + 1) + _min;
    }
}

/* 公哥取所有html标签 */
function getHTMLTags(): Array<string> {
    let tempTags: string = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
        'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
        'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
        'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
        'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
        'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +
        'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +
        'option,output,progress,select,textarea,details,dialog,menu,' +
        'summary,template,blockquote,iframe,tfoot';
    return tempTags.split(",");
}

/* 一些css样式属性名称 */
function getSomeCSSNames(): string[] {
    let tempCSSNames: string =
        'color,background,left,right,top,bottom,font-size,font,flex,float,overflow,text-overflow,white-space,' +
        'justify-content,align-items,center,middle,width,height,align-self,position,transform,transition,' +
        'vertical-align,active,link,hover,visited,visibility,opacity,both,space-between,space-around,space-evenly,' +
        'start,first-of-type,last-of-type,nth-of-type,end,not';
    return tempCSSNames.split(",");
}

export {
    getRandom, getHTMLTags, getSomeCSSNames
}